package com.ysd.twocrm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ysd.twocrm.entity.RoleModules;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

public interface RoleModulesMapper extends BaseMapper<RoleModules> {
    //根据角色id来删除角色模块表内的数据
    @Delete(value = "delete from rolemodules where roleId=#{roleId}")
    Integer delModulesByRoleId(Integer roleId);
    @Insert(value = "insert into rolemodules values(0,#{rid},#{mid})")
    Integer addModulesByRoleIdd(Integer mid,Integer rid);
    //根据模块id来删除
    @Delete(value = "delete from rolemodules where modulesId=#{modulesId}")
    Integer delModulesByMid(Integer modulesId);
}
